<#import "/META-INF/spring.ftl" as spring />
<#import "/META-INF/mspring.ftl" as mspring />
<#include "../inc/header.ftl" />
	<form id="twitterForm" name="twitterForm" action="${base}/admin/twitter/list" method="POST">
		<@spring.bind "twitter" />
		<table>
			<tr>
				<td class="fieldlabel" style="width:70px;">内容 </td>
				<td>
					<@spring.formInput path="twitter.content" attributes='class="textinput"' />
				</td>
				<td><input type="submit" class="btn" value=" 查 询 " /></td>
			</tr>
		</table>
		
		<@spring.bind "twitterPage" />
		<!-- pagination parameter -->
		<@spring.formHiddenInput path="twitterPage.pageNo" />
		<@spring.formHiddenInput path="twitterPage.totalPages" />
		<@spring.formHiddenInput path="twitterPage.totalCount" />
		<!-- sorter parameter -->
		<@spring.formHiddenInput path="twitterPage.sortEnable" />
		<@spring.formHiddenInput path="twitterPage.sort.field" />
		<@spring.formHiddenInput path="twitterPage.sort.order" />
		
		<table class="dtable" cellspacing="0" cellpadding="0">
			<tr>
				<th><input type="checkbox" onclick="mlog.form.checkAll(this, 'id');" /></th>
				<th onclick="sortField(this, 'twitterForm', 'id');" id='id_sort'>编号</th>
				<th>内容</th>
				<th onclick="sortField(this, 'twitterForm', 'author.id');" id='author.id_sort'>作者</th>
				<th onclick="sortField(this, 'twitterForm', 'createTime');" id='createTime_sort'>创建时间</th>
			</tr>
			<#if twitterPage?exists && twitterPage.result?exists>
				<#list twitterPage.result as item>
					<#assign tdClass = "odd">
					<#if item_index%2 == 0>
						<#assign tdClass = "even">
					</#if>
					<tr>
						<td class="${tdClass}"><input type="checkbox" name="id" value="${item.id}" /></td>
						<td class="${tdClass}">${item.id}</td>
						<td class="${tdClass}">${item.content}</td>
						<td class="${tdClass}">${item.author.alias}</td>
						<td class="${tdClass}">${item.createTime}</td>
						
					</tr>
				</#list>
			</#if>
		</table>
		<table style="width:100%;">
			<tr>
				<td>
					<input type="button" class="btn" value=" 删除" onclick="mlog.form.confirmSubmit('twitterForm', '${base}/admin/twitter/delete', '确认要将删除选中的心情吗?');" />
				</td>
				<td>
					<@mspring.pagingnavigator page=twitterPage form_id="twitterForm" />
				</td>
			</tr>
		</table>
	</form>
<#include "../inc/footer.ftl" />